package org.grow.problem.service;

import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @Author: xwg
 * @CreateDate: 2022/5/16
 */

@RestControllerAdvice
public class ExceptionBridge {

    @ExceptionHandler(RuntimeException.class)
    public ResponseEntity<String> runtimeHandler(RuntimeException e) {
        return new ResponseEntity<>(e.getMessage(), null, 888);
    }
}
